Seminar Program Analysis and Transformation Program Slicing and Sliding for Refactoring

نویسنده

  • Mirko Stocker
چکیده

Slicing is an approach to divide a program into chunks that share a common property, like their contribution to the result of a calculation. Slicing can be used to leverage the power of refactoring tools by providing a deeper understanding of the code. For example, the Extract Method refactoring used to extract a series of statements can—with the aid of a slicing algorithm—be enhanced to allow the extraction of non-contiguous statements. This paper summarizes Ran Ettinger’s thesis about “Refactoring via Program Slicing and Sliding”, where he introduces the notion of sliding, a visualization of the slicing procedure based on transparent overhead-projector slides. I also show how several well-known refactorings can benefit from a slicing algorithm.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Refactoring via program slicing and sliding

Mark Weiser’s observation that “programmers use slices when debugging”, back in 1982, started a new field of research. Program slicing, the study of meaningful subprograms that capture a subset of an existing program’s behaviour, aims at providing programmers with tools to assist in a variety of software development and maintenance activities. Two decades later, the work leading to this thesis ...

متن کامل

Program Sliding

As program slicing is a technique for computing a subprogram that preserves a subset of the original program’s functionality, program sliding is a new technique for computing two such subprograms, a slice and its complement, the co-slice. A composition of the slice and co-slice in a sequence is expected to preserve the full functionality of the original code. The co-slice generated by sliding i...

متن کامل

Analysis-based Refactorings for Haskell

Refactoring is the process of improving the design of existing programs without changing their external behaviour. Refactoring can make a program easier to understand or modify if applied appropriately. Preserving behaviour guarantees that refactoring does not introduce (or remove) any bugs. Refactoring has taken a prominent place in software development and maintenance, but most of the recent ...

متن کامل

On Choosing Program Refactoring and Slicing Re-engineering Practice Towards Software Quality

The quality of software depends on its maintainability. Software under evolution is modified and enhanced to accommodate new requirements. As a result, the software becomes more complex and deviates from its original design, in turn lowering the quality. Program Slicing and refactoring as program re-engineering approaches, makes software systems maintainable. Effective slicing and refactoring r...

متن کامل

Data Slicing: Separating the Heap into Independent Regions

In this paper, we present a formal description of data slicing, which is a type-directed program transformation technique that separates a program’s heap into several independent regions. Pointers within each region mirror the structure of pointers in the original heap; however, each field whose type is a base type (e.g., the integer type) appears in only one of these regions. In addition, we d...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008